<?php include "templates/include/header.php" ?>

      <div id="adminHeader">
        <h2>Administration des Renseignements</h2>
        <p>Vous etes connect&eacute; en tant que <b><?php echo htmlspecialchars( $_SESSION['username']) ?></b>. <a href="admin.php?action=logout"?>Se D&eacute;connecter</a></p>
      </div>

      <h1><?php echo htmlspecialchars( $results['pageTitle'] )?></h1>

      <form action="admin.php?action=<?php echo $results['formAction']?>" method="post">
        <input type="hidden" name="infoId" value="<?php echo $results['edit']->id ?>"/>

<?php if ( isset( $results['errorMessage'] ) ) { ?>
        <div class="errorMessage"><?php echo $results['errorMessage'] ?></div>
<?php } ?>

        <div>
        <label for="content">Renseignements :</label>
        <textarea name="content" id="content" required maxlength="100000" style="height: 230px; width: 100%;">
        <?php
          if ( isset( $results['edit']->content ) ) {
            echo( htmlspecialchars( $results['edit']->content ) );
          }
        ?>
        </textarea>
      </div>
      <div class="buttons">
          <input type="submit" name="saveChanges" value="Enregister" />
          <input type="submit" formnovalidate name="cancel" value="Annuler" />
      </div>
    </form>

<?php include "templates/include/footer.php" ?>
